package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitCommentMapper;
import com.ruoyi.bus.domain.WitComment;
import com.ruoyi.bus.service.IWitCommentService;

/**
 * 点评Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-04-14
 */
@Service
public class WitCommentServiceImpl implements IWitCommentService 
{
    @Autowired
    private WitCommentMapper witCommentMapper;

    /**
     * 查询点评
     * 
     * @param commentId 点评ID
     * @return 点评
     */
    @Override
    public WitComment selectWitCommentById(Long commentId)
    {
        return witCommentMapper.selectWitCommentById(commentId);
    }

    /**
     * 查询点评列表
     * 
     * @param witComment 点评
     * @return 点评
     */
    @Override
    public List<WitComment> selectWitCommentList(WitComment witComment)
    {
        return witCommentMapper.selectWitCommentList(witComment);
    }

    /**
     * 新增点评
     * 
     * @param witComment 点评
     * @return 结果
     */
    @Override
    public int insertWitComment(WitComment witComment)
    {
        witComment.setCreateTime(DateUtils.getNowDate());
        return witCommentMapper.insertWitComment(witComment);
    }

    /**
     * 修改点评
     * 
     * @param witComment 点评
     * @return 结果
     */
    @Override
    public int updateWitComment(WitComment witComment)
    {
        return witCommentMapper.updateWitComment(witComment);
    }

    /**
     * 批量删除点评
     * 
     * @param commentIds 需要删除的点评ID
     * @return 结果
     */
    @Override
    public int deleteWitCommentByIds(Long[] commentIds)
    {
        return witCommentMapper.deleteWitCommentByIds(commentIds);
    }

    /**
     * 删除点评信息
     * 
     * @param commentId 点评ID
     * @return 结果
     */
    @Override
    public int deleteWitCommentById(Long commentId)
    {
        return witCommentMapper.deleteWitCommentById(commentId);
    }
}
